package org.example;

import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import org.example.crm.api.ClueServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestController {
    @Autowired
    private ClueServiceApi clueServiceApi;
//    @Autowired
//    private RestTemplate restTemplate;
    @GetMapping
    public Object get(Long id) {
//        RestTemplate restTemplate = new RestTemplate();
//        return restTemplate.getForObject("http://clue-service/clue/" + id,Object.class);
        return clueServiceApi.get(id);
    }
}
